﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public void MapVVLIEF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVVLIEF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVVLIEF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapVVLIEF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertVVLIEF(dwLocal, ITXDBVERSION);
            }
            UpdateVVLIEF(dwLocal);
        }
        public void InsertVVLIEF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "50.24":
                    or1.CommandText = "INSERT INTO VVLIEF(VVMANDANT, VVLIEFSCH, VVLO, VVPRODST1, VVPRODST2, VVPRODST3, VVPRODST4, VVPRODST5, VVPRODST6, VVPRODST7, VVPRODST8, VVPRODST9, VVLIEFSCHTYP, VVKZINLEXP, VVSTATUS, VVVERSART, VVSPED, VVVERSARTU, VVSPEDU, VVVERSARTV, VVSPEDV, VVEBDAT, VVKZEBBUCH, VVLAND, VVPLZ, VVORT, VVBZ, VVBZBEZ, VVCOUNTY, VVCITY, VVAVISNR, VVFBR, VVLIEFBED, VVKZKOSTBER, VVLANDU, VVPLZU, VVORTU, VVBZU, VVBZBEZU, VVCOUNTYU, VVCITYU, VVLIEFSCHGRP, VVVERSDAT, VVLIEFDAT, VVFIXDAT, VVVERPART, VVGUETERNR, VVKZEINZEL, VVEINZTARA, VVEINZBRUT, VVEINZNET, VVANZ, VVTARA, VVBRUTTO, VVNETTO, VVVOLUMEN, VVANZSTK, VVNETMTR, VVWERT, VVLB1, VVANZPAL1, VVANZAPAL1, VVANZRPAL1, VVLB2, VVANZPAL2, VVANZAPAL2, VVANZRPAL2, VVLB3, VVANZPAL3, VVANZAPAL3, VVANZRPAL3, VVLB4, VVANZPAL4, VVANZAPAL4, VVANZRPAL4, VVLB5, VVANZPAL5, VVANZAPAL5, VVANZRPAL5, VVLB6, VVANZPAL6, VVANZAPAL6, VVANZRPAL6, VVKOLP, VVVPLP, VVTPSTA, VVTPMA1, VVTPMAANZ1, VVTPMA2, VVTPMAANZ2, VVGTBS, VVGTBK, VVKM1, VVGTBZ, VVKM2, VVTARIF1, VVORTKL1, VVFRPFL1, VVLAKL1, VVFRSATZ1, VVFRERRECH1, VVMARGEP1, VVMARGEA1, VVSUMME1, VVTARIF2, VVORTKL2, VVFRPFL2, VVLAKL2, VVFRSATZ2, VVFRERRECH2, VVMARGEP2, VVMARGEA2, VVSUMME2, VVTARIF3, VVORTKL3, VVFRPFL3, VVLAKL3, VVFRSATZ3, VVFRERRECH3, VVMARGEP3, VVMARGEA3, VVSUMME3, VVPRAEMIEV, VVPOLICE, VVGDATBIS, VVWERTV, VVWAEHRSLV, VVNEBENKO, VVWAEHRSLN, VVNACHNA, VVFESTBETR, VVVERZOLLT, VVKZABRFR, VVZAHLART, VVZAHLBED, VVKZLSPERR, VVANAME1, VVANAME2, VVASTRASSE, VVASTRASSE2, VVALAND, VVAPLZ, VVAORT, VVABZ, VVABZBEZ, VVACOUNTY, VVACITY, VVKUNDNRV, VVADRSLV, VVKUNDNRE, VVEMPFKZ, VVADRSLL, VVADRSLO, VVKUNDNRVF, VVADRSLKVF, VVADRSLLVF, VVKUNDNRR, VVADRSLKR, VVADRSLLR, VVKUNDNRF, VVADRSLKF, VVADRSLLF, VVANTEILF, VVPI, VVET, VVLS, VVPA, VVLA, VVFR, VVAV, VVDECKBLATT, VVLIEFSCHPOS, VVLPACKNR, VVANZTLIEF, VVANZTLIEFR, VVANZTLIEFB, VVLIEFTERM, VVFRACHTBE, VVVB, VVKZKUNDV, VVZONE, VVKGBIS, VVKDVKL, VVADRSLLUR, VVVALUTA, VVVALDAT, VVEKON, VVVERSIBE, VVVSTK, VVLSTKPA, VVPAUFKRS, VVPAUFLFD, VVPAUFPOS, VVVERPKOST, VVKOSTBGR, VVVERPKOSTE, VVLIEFNR, VVRENR, VVREPOS, VVREDAT, VVFRNETTO, VVFRKSTA, VVZOLLPAP, VVPROGRP, VVUEBKZ, VVDROFT, VVKREDLIM, VVSWING, VVRAITING, VVVERS, VVKREDBIS, VVKREDVON, VVLUEBKZ, VVFRDAT, VVFRZEIT, VVFRBENID, VVKUNDNRRE, VVLIEFART, VVKTRANSDAT, VVKTRANSUHR, VVKTRANSBEN, VVKTRANSSTA, VVSTRANSDATA, VVSTRANSUHRA, VVSTRANSERL, VVSTRANSDATE, VVSTRANSUHRE, VVETRANSDAT, VVETRANSUHR, VVETRANSBEN, VVAKTKZ, VVPSTKKZ, VVANZVP, VVWAEHRSL, VVHWAEHRSL, VVHEUROKURS, VVHEUROKURSVK, VVFEUROKURS, VVFEUROKURSVK, VVLOHNKD, VVARCHKZ, VVARCHDAT, VVARCHBEL, VVSEQUNO, VVLFDPN, VVARTGRP, VVAETINEU, VVPTARIF, VVANSPRECH, VVANSPZUS, VVTRANSSEQ, VVEDI, VVEDIDAT, VVQUITTAIO, VVGESMTR, VVLOAD, VVFILLER, VVAENDZL, VVAENDBEN, VVAENDDAT, VVNEUBEN, VVNEUDAT)"
                                + " VALUES (:VVMANDANT, :VVLIEFSCH, '01', 'M', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'U', 'I', 'EN', '   ', '   ', '   ', '   ', '   ', '   ', 0, ' ', 'CN ', '            ', '·eé?                                    ', '  ', '             ', '    ', '    ', '00000000', '0000', '   ', ' ', '   ', '            ', '                                        ', '  ', '             ', '    ', '    ', ' ', 0, 0, 0, '   ', '    ', ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '0000000000', '  ', 0, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '        ', '        ', ' ', '    ', 0, '    ', 0, 0, 0, 0, 0, 0, '        ', '  ', 0, 0, 0, 0, 0, 0, 0, '        ', '  ', 0, 0, 0, 0, 0, 0, 0, '        ', '  ', 0, 0, 0, 0, 0, 0, 0, 0, '          ', 0, 0, '   ', 0, '   ', 0, 0, ' ', ' ', ' ', '   ', 'N', '                                        ', '                                        ', '                                        ', '                                        ', '   ', '            ', '                                        ', '  ', '             ', '    ', '    ', '00000000', '01      ', '00000000', ' ', '        ', '        ', '        ', '        ', '    ', '00000000', '        ', '    ', '        ', '        ', '    ', 0, 'N', 'N', 'N', 'N', 'N', 'N', 'N', ' ', '001', 0, 1, 0, 1, 0, '0000000000', '   ', ' ', '    ', 0, '   ', '        ', 0, 0, '        ', '0000000000', 0, 30, '  ', '000000', '000', 0, 0, 0, '        ', '          ', '0000', 0, 0, ' ', ' ', '   ', ' ', ' ', '0000000000', '0000000000', '   ', '  ', 0, 0, ' ', 0, 0, '        ', '        ', ' ', 0, 0, '        ', ' ', 0, 0, ' ', 0, 0, 0, 0, '        ', ' ', ' ', 0, '   ', '   ', 0, ' ', 0, ' ', '        ', ' ', '00000000', '00000000', '000000000000000', '0000', '   ', ' ', ' ', '        ', '                          ', '00000000', ' ', '00000000', ' ', '000000000', '0000', '                                                             ', 1, '        ', 0, 'SUNLV   ', 20120530)";
                    break;
                case "50.25":
                    or1.CommandText = "INSERT INTO VVLIEF(VVMANDANT, VVLIEFSCH, VVLO, VVPRODST1, VVPRODST2, VVPRODST3, VVPRODST4, VVPRODST5, VVPRODST6, VVPRODST7, VVPRODST8, VVPRODST9, VVLIEFSCHTYP, VVKZINLEXP, VVSTATUS, VVVERSART, VVSPED, VVVERSARTU, VVSPEDU, VVVERSARTV, VVSPEDV, VVEBDAT, VVKZEBBUCH, VVLAND, VVPLZ, VVORT, VVBZ, VVBZBEZ, VVCOUNTY, VVCITY, VVAVISNR, VVFBR, VVLIEFBED, VVKZKOSTBER, VVLANDU, VVPLZU, VVORTU, VVBZU, VVBZBEZU, VVCOUNTYU, VVCITYU, VVLIEFSCHGRP, VVVERSDAT, VVLIEFDAT, VVFIXDAT, VVVERPART, VVGUETERNR, VVKZEINZEL, VVEINZTARA, VVEINZBRUT, VVEINZNET, VVANZ, VVTARA, VVBRUTTO, VVNETTO, VVVOLUMEN, VVANZSTK, VVNETMTR, VVWERT, VVLB1, VVANZPAL1, VVANZAPAL1, VVANZRPAL1, VVLB2, VVANZPAL2, VVANZAPAL2, VVANZRPAL2, VVLB3, VVANZPAL3, VVANZAPAL3, VVANZRPAL3, VVLB4, VVANZPAL4, VVANZAPAL4, VVANZRPAL4, VVLB5, VVANZPAL5, VVANZAPAL5, VVANZRPAL5, VVLB6, VVANZPAL6, VVANZAPAL6, VVANZRPAL6, VVKOLP, VVVPLP, VVTPSTA, VVTPMA1, VVTPMAANZ1, VVTPMA2, VVTPMAANZ2, VVGTBS, VVGTBK, VVKM1, VVGTBZ, VVKM2, VVTARIF1, VVORTKL1, VVFRPFL1, VVLAKL1, VVFRSATZ1, VVFRERRECH1, VVMARGEP1, VVMARGEA1, VVSUMME1, VVTARIF2, VVORTKL2, VVFRPFL2, VVLAKL2, VVFRSATZ2, VVFRERRECH2, VVMARGEP2, VVMARGEA2, VVSUMME2, VVTARIF3, VVORTKL3, VVFRPFL3, VVLAKL3, VVFRSATZ3, VVFRERRECH3, VVMARGEP3, VVMARGEA3, VVSUMME3, VVPRAEMIEV, VVPOLICE, VVGDATBIS, VVWERTV, VVWAEHRSLV, VVNEBENKO, VVWAEHRSLN, VVNACHNA, VVFESTBETR, VVVERZOLLT, VVKZABRFR, VVZAHLART, VVZAHLBED, VVKZLSPERR, VVANAME1, VVANAME2, VVASTRASSE, VVASTRASSE2, VVALAND, VVAPLZ, VVAORT, VVABZ, VVABZBEZ, VVACOUNTY, VVACITY, VVKUNDNRV, VVADRSLV, VVKUNDNRE, VVEMPFKZ, VVADRSLL, VVADRSLO, VVKUNDNRVF, VVADRSLKVF, VVADRSLLVF, VVKUNDNRR, VVADRSLKR, VVADRSLLR, VVKUNDNRF, VVADRSLKF, VVADRSLLF, VVANTEILF, VVPI, VVET, VVLS, VVPA, VVLA, VVFR, VVAV, VVDECKBLATT, VVLIEFSCHPOS, VVLPACKNR, VVANZTLIEF, VVANZTLIEFR, VVANZTLIEFB, VVLIEFTERM, VVFRACHTBE, VVVB, VVKZKUNDV, VVZONE, VVKGBIS, VVKDVKL, VVADRSLLUR, VVVALUTA, VVVALDAT, VVEKON, VVVERSIBE, VVVSTK, VVLSTKPA, VVPAUFKRS, VVPAUFLFD, VVPAUFPOS, VVVERPKOST, VVKOSTBGR, VVVERPKOSTE, VVLIEFNR, VVRENR, VVREPOS, VVREDAT, VVFRNETTO, VVFRKSTA, VVZOLLPAP, VVPROGRP, VVUEBKZ, VVDROFT, VVKREDLIM, VVSWING, VVRAITING, VVVERS, VVKREDBIS, VVKREDVON, VVLUEBKZ, VVFRDAT, VVFRZEIT, VVFRBENID, VVKUNDNRRE, VVLIEFART, VVKTRANSDAT, VVKTRANSUHR, VVKTRANSBEN, VVKTRANSSTA, VVSTRANSDATA, VVSTRANSUHRA, VVSTRANSERL, VVSTRANSDATE, VVSTRANSUHRE, VVETRANSDAT, VVETRANSUHR, VVETRANSBEN, VVAKTKZ, VVPSTKKZ, VVANZVP, VVWAEHRSL, VVHWAEHRSL, VVHEUROKURS, VVHEUROKURSVK, VVFEUROKURS, VVFEUROKURSVK, VVLOHNKD, VVARCHKZ, VVARCHDAT, VVARCHBEL, VVSEQUNO, VVLFDPN, VVARTGRP, VVAETINEU, VVPTARIF, VVANSPRECH, VVANSPZUS, VVTRANSSEQ, VVEDI, VVEDIDAT, VVQUITTAIO, VVGESMTR, VVLOAD, VVFILLER, VVAENDZL, VVAENDBEN, VVAENDDAT, VVNEUBEN, VVNEUDAT)"
                        + " VALUES (:VVMANDANT, :VVLIEFSCH, '  ', 'M', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'V', 'E', '  ', '   ', '   ', '   ', '   ', '   ', '   ', 0, ' ', '   ', '            ', '                                        ', '  ', '             ', '    ', '    ', '00000000', '0000', '   ', 'N', '   ', '            ', '                                        ', '1 ', '             ', '    ', '    ', ' ', 0, 0, 0, '   ', '    ', 'N', 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, '0000000000', '  ', 1, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '  ', 0, 0, 0, '        ', '        ', ' ', '    ', 0, '    ', 0, 0, 0, 0, 0, 0, '        ', '  ', 0, 0, 0, 0, 0, 0, 0, '        ', '  ', 0, 0, 0, 0, 0, 0, 0, '        ', '  ', 0, 0, 0, 0, 0, 0, 0, 0, '          ', 0, 0, '   ', 0, '   ', 0, 0, 'N', 'N', 'N', '   ', 'N', '                                        ', '                                        ', '                                        ', '                                        ', '   ', '            ', '                                        ', '  ', '             ', '    ', '    ', '00000000', '01      ', '00000000', ' ', '        ', '        ', '        ', '        ', '    ', '00000000', '        ', '    ', '        ', '        ', '    ', 0, 'N', 'N', 'N', 'N', 'N', 'N', 'N', ' ', '001', 1, 1, 0, 0, 0, '0000000000', '   ', 'N', '    ', 0, '   ', '        ', 0, 0, '        ', '0000000000', 0, 0, '  ', '000000', '000', 0, 0, 0, '00000000', '          ', '0000', 0, 0, 'A', 'J', '   ', ' ', ' ', '0000000000', '0000000000', '003', '01', 0, 0, 'N', 0, 0, '        ', '        ', ' ', 0, 0, '        ', ' ', 0, 0, ' ', 0, 0, 0, 0, '        ', ' ', ' ', 0, '   ', '   ', 0, ' ', 0, ' ', '00000000', ' ', '00000000', '00000000', '000000000000000', '0000', '   ', ' ', ' ', '        ', '                          ', '00000000', ' ', '00000000', ' ', '000000000', '0000', '                                                             ', 0, '        ', 0, '        ', 0)";
                    break;
                default:
                    break;
            }
            or1.Parameters.Add("VVMANDANT", OracleType.NVarChar).Value = dwData["VVMANDANT"].ToString();
            or1.Parameters.Add("VVLIEFSCH", OracleType.NVarChar).Value = dwData["VVLIEFSCH"].ToString();
            Connect2Proxy(or1);
        }

        public DataSet QueryVVLIEF(DataRow dwData, int option = 1)
        {
            DataSet Return = new DataSet();
            DataTable tbLocal = null;
            DataSet Result = new DataSet();
            string table = "VVLIEF";

            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VVLIEF WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT * FROM VVLIEF WHERE VVMANDANT=:VVMANDANT AND VVLIEFSCH=:VVLIEFSCH";
                    or1.Parameters.Add("VVMANDANT", OracleType.NVarChar).Value = dwData["VVMANDANT"].ToString();
                    or1.Parameters.Add("VVLIEFSCH", OracleType.NVarChar).Value = dwData["VVLIEFSCH"].ToString();
                    break;
                case 2:
                    or1.CommandText = "SELECT DISTINCT R.VRPRENR,VRPREPOS,VRPAUFKRS,VRPAUFLFD,VRPAUFPOS,VV.* "
                  + " FROM VRPOS R JOIN VVLIEF VV ON R.VRPLIEFSCH=VV.VVLIEFSCH"
                  + " WHERE VRPMANDANT=:VRPMANDANT AND VRPRENR = :VRPRENR";
                    or1.Parameters.Add("VRPMANDANT", OracleType.NVarChar).Value = dwData["VRPMANDANT"].ToString();
                    or1.Parameters.Add("VRPRENR", OracleType.NVarChar).Value = dwData["VRPRENR"].ToString();
                    break;
                case 3:
                    or1.CommandText = "SELECT V.* FROM VVLIEF V JOIN VVTLIEF T ON V.VVMANDANT=VVTMANDANT AND VVLIEFSCH=VVTLIEFSCH "
                  + " WHERE VVTMANDANT=:VVTMANDANT AND VVTAUFKRS = :VVTAUFKRS AND VVTAUFLFD=:VVTAUFLFD";
                    or1.Parameters.Add("VVTMANDANT", OracleType.NVarChar).Value = dwData["VVTMANDANT"].ToString();
                    or1.Parameters.Add("VVTAUFKRS", OracleType.NVarChar).Value = dwData["VVTAUFKRS"].ToString();
                    or1.Parameters.Add("VVTAUFLFD", OracleType.NVarChar).Value = dwData["VVTAUFLFD"].ToString();
                    break;
                case 4:
                    or1.CommandText = "SELECT DISTINCT 0 AS DUEAMOUNT, KDKUNDNA,KDNAME1,VRKFAELLIG,VKKBESTNR,VKPPOSTYP,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,VKPART,VKPFARBE,VKPKDARTNR,VKPKDFARBNR,VVLIEFSCH,GPAPARTIE,GPASPPART,GPAFBPART,VVFRDAT,VVTNETKG*0.01 AS VVTNETKG ,VRPMENGE*0.01 AS VRPMENGE,VKPPREIS*0.001 AS VKPPREISX,VRPMEEH,VKKHWAEHRSL||'/'||VKPPREH AS PUM,VRPGESWERT*0.001 AS VRPGESWERT,VRPWAWERT*0.001 AS VRPWAWERT,GLOAMICUC*0.01 AS GLOAMICUC FROM VRPOS VRP JOIN VRKOPF VRK ON VRKMANDANT=VRPMANDANT AND VRKRENR=VRPRENR JOIN VKPOS VKP ON VKPMANDANT=VRPMANDANT AND VRPAUFKRS=VKPAUFKRS AND VRPAUFLFD=VKPAUFLFD AND VRPAUFPOS=VKPAUFPOS JOIN VKKOPF VKK ON VKKMANDANT=VKPMANDANT AND VKKAUFKRS=VKPAUFKRS AND VKKAUFLFD=VKPAUFLFD JOIN KDSTAMM KD ON VKKMANDANT=KDMANDANT AND VKKKUNDNR=KDKUNDNR JOIN VVLIEF VV ON VVMANDANT=VRPMANDANT AND VVLIEFSCH=VRPLIEFSCH JOIN VVTLIEF VVT ON VVTMANDANT=VRPMANDANT AND VVTLIEFSCH=VRPLIEFSCH AND VVTAUFKRS=VKPAUFKRS AND VVTAUFLFD=VKPAUFLFD AND VVTAUFPOS=VKPAUFPOS JOIN GPACK GP ON GPAMANDANT=VVTMANDANT AND GPALIEFSCH=VRPLIEFSCH   AND GPAAUFKRS=VKPAUFKRS AND GPAAUFLFD=VKPAUFLFD AND GPAAUFPOS=VKPAUFPOS LEFT JOIN GLOPITEM ON GLOMANDANT=VKKMANDANT AND GLOITEM=VKKOPITEM "
                        + " WHERE VVTMANDANT=:VVTMANDANT AND VVFRDAT >= :VVFRDAT";
                    or1.Parameters.Add("VVTMANDANT", OracleType.NVarChar).Value = dwData["VVTMANDANT"].ToString();
                    or1.Parameters.Add("VVFRDAT", OracleType.NVarChar).Value = dwData["DEND"].ToString();
                    break;
                case 5:
                    or1.CommandText = "SELECT DISTINCT V.* FROM VVLIEF V JOIN VVTLIEF ON VVTLIEFSCH=VVLIEFSCH JOIN VKPOS ON VKPAUFKRS=VVTAUFKRS AND VKPAUFLFD=VVTAUFLFD AND VKPAUFPOS=VVTAUFPOS AND VKPSA='  ' WHERE VVNEUDAT>='" + dwData["DSTART"].ToString() + "' AND VVNEUDAT<='" + dwData["DEND"].ToString() + "' AND VVSTATUS IN (" + dwData["C20"].ToString() + ")";
                    break;
                case 6:
                    /*
                    or1.CommandText = "SELECT MIN(VKPWUTERM) AS VKPWUTERM,VVLIEFSCH,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,KDKNAME,VVADRSLL,COUNT(*) AS PACKNR,SUM(VVPBRUTTO)*0.001 AS VVPBRUTTO,SUM(VVPNETTO)*0.001 AS VVPNETTO"
                        + " FROM VVLIEF JOIN VVTLIEF ON VVTLIEFSCH=VVLIEFSCH"
                        + " JOIN VKPOS ON VKPSA='  'AND VVTAUFKRS=VKPAUFKRS AND VVTAUFLFD=VKPAUFLFD AND VVTAUFPOS=VKPAUFPOS"
                        + " JOIN VVPACK ON VVPLIEFSCH=VVLIEFSCH JOIN GPACK ON GPALIEFSCH=VVPLIEFSCH AND GPAPACKNR=VVPPACKNR AND GPAAUFKRS=VVTAUFKRS AND GPAAUFLFD=VVTAUFLFD AND GPAAUFPOS=VVTAUFPOS JOIN KDSTAMM ON VVKUNDNRE=KDKUNDNR"
                        + " LEFT JOIN KUNDADR ON KDAKUNDNR=VVKUNDNRE AND VVADRSLL=KDAADRSL"
                        + " WHERE VVSTATUS IN (" + dwData["C20"].ToString() + ")"
                        + " GROUP BY VVLIEFSCH,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,KDKNAME,VVADRSLL,VKPART,VKPFARBE"
                        + " ORDER BY 1,2,3,4,5";*/
                    or1.CommandText = "SELECT MIN(VKPWUTERM) AS VKPWUTERM,VVAVISNR,VVLIEFSCH,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,KDKNAME,VKPART,VKPFARBE,VKKBESTNR,VVADRSLL,COUNT(*) AS PACKNR,MAX(VKPMENGE1*0.1) AS VKPMENGE1,MAX(VKPKDKOMM) AS VKPKDKOMM,ROUND(SUM(GPAKG)*0.001,2) AS VVKG,ROUND(SUM(GPAKGNET)*0.001,2) AS VVNETKG,GPAKGNET*0.001 AS PACKNET,SUM(GPAKG )*0.001 AS PACKGROSS,GPASPPART,GPAFBPART,GPABEM FROM VVLIEF JOIN VVTLIEF ON   VVTLIEFSCH=VVLIEFSCH  JOIN VKPOS ON VKPSA='  'AND VVTAUFKRS=VKPAUFKRS AND VVTAUFLFD=VKPAUFLFD AND VVTAUFPOS=VKPAUFPOS  JOIN VKKOPF ON VKKAUFKRS=VKPAUFKRS AND VKKAUFLFD=VKPAUFLFD AND VKKSA='  ' JOIN VVPACK ON VVPLIEFSCH=VVLIEFSCH JOIN GPACK ON GPALIEFSCH=VVPLIEFSCH AND GPATEILNR = VVTTEILNR AND GPAPACKNR=VVPPACKNR AND GPAAUFKRS=VVTAUFKRS AND GPAAUFLFD=VVTAUFLFD AND GPAAUFPOS=VVTAUFPOS JOIN KDSTAMM ON VVKUNDNRE=KDKUNDNR LEFT JOIN KUNDADR ON KDAKUNDNR=VVKUNDNRE AND VVADRSLL=KDAADRSL"
                        + " WHERE  VVNEUDAT>='" + dwData["DSTART"].ToString() + "' AND VVNEUDAT<='" + dwData["DEND"].ToString() + "' AND VVSTATUS IN (" + dwData["C20"].ToString() + ")"
                        + "  GROUP BY VVAVISNR,VVLIEFSCH,VKPAUFKRS,VKPAUFLFD,VKPAUFPOS,KDKNAME,VVADRSLL,VKPART,VKPFARBE,GPASPPART,GPAKGNET,GPAFBPART,GPABEM,VKKBESTNR"
                        + " ORDER BY VVAVISNR,VVLIEFSCH,VKPAUFKRS,      VKPAUFLFD,VKPAUFPOS,PACKNR DESC";
                    break;
                case 7:
                    //AND ZULB<>'KO'  
                    or1.CommandText = "SELECT MIN(VKPWUTERM) AS VKPWUTERM,VVAVISNR,VVLIEFSCH,VKPAUFKRS,      VKPAUFLFD,VKPAUFPOS,KDKNAME,VKPART,VKPFARBE,VKKBESTNR,VVADRSLL,COUNT(*) AS PACKNR,MAX(VKPMENGE1*0.1) AS VKPMENGE1,MAX(VKPKDKOMM) AS VKPKDKOMM,      ROUND(SUM(ZUEINTKG)*0.001,2) AS VVKG,ROUND(SUM(ZUEINTKG)*0.001,2) AS VVNETKG,ZUEINTKG*0.001 AS PACKNET,SUM(ZUEINTKG )*0.001 AS PACKGROSS,      GPSPPART AS GPASPPART,GPFBPART AS GPAFBPART,GPBEM1 AS GPABEM FROM VVLIEF JOIN VVTLIEF ON VVTLIEFSCH=VVLIEFSCH       JOIN VKPOS ON VKPSA='  'AND VVTAUFKRS=VKPAUFKRS AND VVTAUFLFD=VKPAUFLFD AND VVTAUFPOS=VKPAUFPOS      JOIN VKKOPF ON VKKAUFKRS=VKPAUFKRS AND VKKAUFLFD=VKPAUFLFD   AND VKKSA='  '   JOIN ZUTEI ON ZUAUFKRS=VVTAUFKRS AND ZUAUFLFD=VVTAUFLFD AND ZUAUFPOS=VVTAUFPOS   AND VVTTEILNR=ZUTEILNR  JOIN GPDAT ON GPPARTIE=ZUPARTIE       JOIN KDSTAMM ON VVKUNDNRE=KDKUNDNR LEFT JOIN KUNDADR ON KDAKUNDNR=VVKUNDNRE AND VVADRSLL=KDAADRSL"
                        + " WHERE  VVNEUDAT>='" + dwData["DSTART"].ToString() + "' AND VVNEUDAT<='" + dwData["DEND"].ToString() + "' AND VVSTATUS IN (" + dwData["C20"].ToString() + ")"
                        + " GROUP BY VVAVISNR,VVLIEFSCH,VKPAUFKRS,VKPAUFLFD,ZUEINTKG,VKPAUFPOS,KDKNAME,VVADRSLL,VKPART,VKPFARBE,GPSPPART,GPFBPART,GPBEM1,VKKBESTNR"
                        + " ORDER BY VVAVISNR,VVLIEFSCH,VKPAUFKRS,      VKPAUFLFD,VKPAUFPOS,PACKNR DESC";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
            {
                tbLocal = Result.Tables[0];
                tbLocal.TableName = "VVLIEF";
            }
            Return.Merge(Result);
            return Return;
        }
        public void UpdateVVLIEF(DataRow dwData, int option=1)
        {
            OracleCommand or1;
            DataSet result = new DataSet();
            or1 = OracleDB.CreateCommand(); 
            switch (option)
            { 
                case 1:
                        #region====Command====
            or1.CommandText = "UPDATE VVLIEF SET "
                + "VVMANDANT=:VVMANDANT,"
                + "VVLIEFSCH=:VVLIEFSCH,"
                + "VVLO=:VVLO,"
                + "VVPRODST1=:VVPRODST1,"
                + "VVPRODST2=:VVPRODST2,"
                + "VVPRODST3=:VVPRODST3,"
                + "VVPRODST4=:VVPRODST4,"
                + "VVPRODST5=:VVPRODST5,"
                + "VVPRODST6=:VVPRODST6,"
                + "VVPRODST7=:VVPRODST7,"
                + "VVPRODST8=:VVPRODST8,"
                + "VVPRODST9=:VVPRODST9,"
                + "VVLIEFSCHTYP=:VVLIEFSCHTYP,"
                + "VVKZINLEXP=:VVKZINLEXP,"
                + "VVSTATUS=:VVSTATUS,"
                + "VVVERSART=:VVVERSART,"
                + "VVSPED=:VVSPED,"
                + "VVVERSARTU=:VVVERSARTU,"
                + "VVSPEDU=:VVSPEDU,"
                + "VVVERSARTV=:VVVERSARTV,"
                + "VVSPEDV=:VVSPEDV,"
                + "VVEBDAT=:VVEBDAT,"
                + "VVKZEBBUCH=:VVKZEBBUCH,"
                + "VVLAND=:VVLAND,"
                + "VVPLZ=:VVPLZ,"
                + "VVORT=:VVORT,"
                + "VVBZ=:VVBZ,"
                + "VVBZBEZ=:VVBZBEZ,"
                + "VVCOUNTY=:VVCOUNTY,"
                + "VVCITY=:VVCITY,"
                + "VVAVISNR=:VVAVISNR,"
                + "VVFBR=:VVFBR,"
                + "VVLIEFBED=:VVLIEFBED,"
                + "VVKZKOSTBER=:VVKZKOSTBER,"
                + "VVLANDU=:VVLANDU,"
                + "VVPLZU=:VVPLZU,"
                + "VVORTU=:VVORTU,"
                + "VVBZU=:VVBZU,"
                + "VVBZBEZU=:VVBZBEZU,"
                + "VVCOUNTYU=:VVCOUNTYU,"
                + "VVCITYU=:VVCITYU,"
                + "VVLIEFSCHGRP=:VVLIEFSCHGRP,"
                + "VVVERSDAT=:VVVERSDAT,"
                + "VVLIEFDAT=:VVLIEFDAT,"
                + "VVFIXDAT=:VVFIXDAT,"
                + "VVVERPART=:VVVERPART,"
                + "VVGUETERNR=:VVGUETERNR,"
                + "VVKZEINZEL=:VVKZEINZEL,"
                + "VVEINZTARA=:VVEINZTARA,"
                + "VVEINZBRUT=:VVEINZBRUT,"
                + "VVEINZNET=:VVEINZNET,"
                + "VVANZ=:VVANZ,"
                + "VVTARA=:VVTARA,"
                + "VVBRUTTO=:VVBRUTTO,"
                + "VVNETTO=:VVNETTO,"
                + "VVVOLUMEN=:VVVOLUMEN,"
                + "VVANZSTK=:VVANZSTK,"
                + "VVNETMTR=:VVNETMTR,"
                + "VVWERT=:VVWERT,"
                + "VVLB1=:VVLB1,"
                + "VVANZPAL1=:VVANZPAL1,"
                + "VVANZAPAL1=:VVANZAPAL1,"
                + "VVANZRPAL1=:VVANZRPAL1,"
                + "VVLB2=:VVLB2,"
                + "VVANZPAL2=:VVANZPAL2,"
                + "VVANZAPAL2=:VVANZAPAL2,"
                + "VVANZRPAL2=:VVANZRPAL2,"
                + "VVLB3=:VVLB3,"
                + "VVANZPAL3=:VVANZPAL3,"
                + "VVANZAPAL3=:VVANZAPAL3,"
                + "VVANZRPAL3=:VVANZRPAL3,"
                + "VVLB4=:VVLB4,"
                + "VVANZPAL4=:VVANZPAL4,"
                + "VVANZAPAL4=:VVANZAPAL4,"
                + "VVANZRPAL4=:VVANZRPAL4,"
                + "VVLB5=:VVLB5,"
                + "VVANZPAL5=:VVANZPAL5,"
                + "VVANZAPAL5=:VVANZAPAL5,"
                + "VVANZRPAL5=:VVANZRPAL5,"
                + "VVLB6=:VVLB6,"
                + "VVANZPAL6=:VVANZPAL6,"
                + "VVANZAPAL6=:VVANZAPAL6,"
                + "VVANZRPAL6=:VVANZRPAL6,"
                + "VVKOLP=:VVKOLP,"
                + "VVVPLP=:VVVPLP,"
                + "VVTPSTA=:VVTPSTA,"
                + "VVTPMA1=:VVTPMA1,"
                + "VVTPMAANZ1=:VVTPMAANZ1,"
                + "VVTPMA2=:VVTPMA2,"
                + "VVTPMAANZ2=:VVTPMAANZ2,"
                + "VVGTBS=:VVGTBS,"
                + "VVGTBK=:VVGTBK,"
                + "VVKM1=:VVKM1,"
                + "VVGTBZ=:VVGTBZ,"
                + "VVKM2=:VVKM2,"
                + "VVTARIF1=:VVTARIF1,"
                + "VVORTKL1=:VVORTKL1,"
                + "VVFRPFL1=:VVFRPFL1,"
                + "VVLAKL1=:VVLAKL1,"
                + "VVFRSATZ1=:VVFRSATZ1,"
                + "VVFRERRECH1=:VVFRERRECH1,"
                + "VVMARGEP1=:VVMARGEP1,"
                + "VVMARGEA1=:VVMARGEA1,"
                + "VVSUMME1=:VVSUMME1,"
                + "VVTARIF2=:VVTARIF2,"
                + "VVORTKL2=:VVORTKL2,"
                + "VVFRPFL2=:VVFRPFL2,"
                + "VVLAKL2=:VVLAKL2,"
                + "VVFRSATZ2=:VVFRSATZ2,"
                + "VVFRERRECH2=:VVFRERRECH2,"
                + "VVMARGEP2=:VVMARGEP2,"
                + "VVMARGEA2=:VVMARGEA2,"
                + "VVSUMME2=:VVSUMME2,"
                + "VVTARIF3=:VVTARIF3,"
                + "VVORTKL3=:VVORTKL3,"
                + "VVFRPFL3=:VVFRPFL3,"
                + "VVLAKL3=:VVLAKL3,"
                + "VVFRSATZ3=:VVFRSATZ3,"
                + "VVFRERRECH3=:VVFRERRECH3,"
                + "VVMARGEP3=:VVMARGEP3,"
                + "VVMARGEA3=:VVMARGEA3,"
                + "VVSUMME3=:VVSUMME3,"
                + "VVPRAEMIEV=:VVPRAEMIEV,"
                + "VVPOLICE=:VVPOLICE,"
                + "VVGDATBIS=:VVGDATBIS,"
                + "VVWERTV=:VVWERTV,"
                + "VVWAEHRSLV=:VVWAEHRSLV,"
                + "VVNEBENKO=:VVNEBENKO,"
                + "VVWAEHRSLN=:VVWAEHRSLN,"
                + "VVNACHNA=:VVNACHNA,"
                + "VVFESTBETR=:VVFESTBETR,"
                + "VVVERZOLLT=:VVVERZOLLT,"
                + "VVKZABRFR=:VVKZABRFR,"
                + "VVZAHLART=:VVZAHLART,"
                + "VVZAHLBED=:VVZAHLBED,"
                + "VVKZLSPERR=:VVKZLSPERR,"
                + "VVANAME1=:VVANAME1,"
                + "VVANAME2=:VVANAME2,"
                + "VVASTRASSE=:VVASTRASSE,"
                + "VVASTRASSE2=:VVASTRASSE2,"
                + "VVALAND=:VVALAND,"
                + "VVAPLZ=:VVAPLZ,"
                + "VVAORT=:VVAORT,"
                + "VVABZ=:VVABZ,"
                + "VVABZBEZ=:VVABZBEZ,"
                + "VVACOUNTY=:VVACOUNTY,"
                + "VVACITY=:VVACITY,"
                + "VVKUNDNRV=:VVKUNDNRV,"
                + "VVADRSLV=:VVADRSLV,"
                + "VVKUNDNRE=:VVKUNDNRE,"
                + "VVEMPFKZ=:VVEMPFKZ,"
                + "VVADRSLL=:VVADRSLL,"
                + "VVADRSLO=:VVADRSLO,"
                + "VVKUNDNRVF=:VVKUNDNRVF,"
                + "VVADRSLKVF=:VVADRSLKVF,"
                + "VVADRSLLVF=:VVADRSLLVF,"
                + "VVKUNDNRR=:VVKUNDNRR,"
                + "VVADRSLKR=:VVADRSLKR,"
                + "VVADRSLLR=:VVADRSLLR,"
                + "VVKUNDNRF=:VVKUNDNRF,"
                + "VVADRSLKF=:VVADRSLKF,"
                + "VVADRSLLF=:VVADRSLLF,"
                + "VVANTEILF=:VVANTEILF,"
                + "VVPI=:VVPI,"
                + "VVET=:VVET,"
                + "VVLS=:VVLS,"
                + "VVPA=:VVPA,"
                + "VVLA=:VVLA,"
                + "VVFR=:VVFR,"
                + "VVAV=:VVAV,"
                + "VVDECKBLATT=:VVDECKBLATT,"
                + "VVLIEFSCHPOS=:VVLIEFSCHPOS,"
                + "VVLPACKNR=:VVLPACKNR,"
                + "VVANZTLIEF=:VVANZTLIEF,"
                + "VVANZTLIEFR=:VVANZTLIEFR,"
                + "VVANZTLIEFB=:VVANZTLIEFB,"
                + "VVLIEFTERM=:VVLIEFTERM,"
                + "VVFRACHTBE=:VVFRACHTBE,"
                + "VVVB=:VVVB,"
                + "VVKZKUNDV=:VVKZKUNDV,"
                + "VVZONE=:VVZONE,"
                + "VVKGBIS=:VVKGBIS,"
                + "VVKDVKL=:VVKDVKL,"
                + "VVADRSLLUR=:VVADRSLLUR,"
                + "VVVALUTA=:VVVALUTA,"
                + "VVVALDAT=:VVVALDAT,"
                + "VVEKON=:VVEKON,"
                + "VVVERSIBE=:VVVERSIBE,"
                + "VVVSTK=:VVVSTK,"
                + "VVLSTKPA=:VVLSTKPA,"
                + "VVPAUFKRS=:VVPAUFKRS,"
                + "VVPAUFLFD=:VVPAUFLFD,"
                + "VVPAUFPOS=:VVPAUFPOS,"
                + "VVVERPKOST=:VVVERPKOST,"
                + "VVKOSTBGR=:VVKOSTBGR,"
                + "VVVERPKOSTE=:VVVERPKOSTE,"
                + "VVLIEFNR=:VVLIEFNR,"
                + "VVRENR=:VVRENR,"
                + "VVREPOS=:VVREPOS,"
                + "VVREDAT=:VVREDAT,"
                + "VVFRNETTO=:VVFRNETTO,"
                + "VVFRKSTA=:VVFRKSTA,"
                + "VVZOLLPAP=:VVZOLLPAP,"
                + "VVPROGRP=:VVPROGRP,"
                + "VVUEBKZ=:VVUEBKZ,"
                + "VVDROFT=:VVDROFT,"
                + "VVKREDLIM=:VVKREDLIM,"
                + "VVSWING=:VVSWING,"
                + "VVRAITING=:VVRAITING,"
                + "VVVERS=:VVVERS,"
                + "VVKREDBIS=:VVKREDBIS,"
                + "VVKREDVON=:VVKREDVON,"
                + "VVLUEBKZ=:VVLUEBKZ,"
                + "VVFRDAT=:VVFRDAT,"
                + "VVFRZEIT=:VVFRZEIT,"
                + "VVFRBENID=:VVFRBENID,"
                + "VVKUNDNRRE=:VVKUNDNRRE,"
                + "VVLIEFART=:VVLIEFART,"
                + "VVKTRANSDAT=:VVKTRANSDAT,"
                + "VVKTRANSUHR=:VVKTRANSUHR,"
                + "VVKTRANSBEN=:VVKTRANSBEN,"
                + "VVKTRANSSTA=:VVKTRANSSTA,"
                + "VVSTRANSDATA=:VVSTRANSDATA,"
                + "VVSTRANSUHRA=:VVSTRANSUHRA,"
                + "VVSTRANSERL=:VVSTRANSERL,"
                + "VVSTRANSDATE=:VVSTRANSDATE,"
                + "VVSTRANSUHRE=:VVSTRANSUHRE,"
                + "VVETRANSDAT=:VVETRANSDAT,"
                + "VVETRANSUHR=:VVETRANSUHR,"
                + "VVETRANSBEN=:VVETRANSBEN,"
                + "VVAKTKZ=:VVAKTKZ,"
                + "VVPSTKKZ=:VVPSTKKZ,"
                + "VVANZVP=:VVANZVP,"
                + "VVWAEHRSL=:VVWAEHRSL,"
                + "VVHWAEHRSL=:VVHWAEHRSL,"
                + "VVHEUROKURS=:VVHEUROKURS,"
                + "VVHEUROKURSVK=:VVHEUROKURSVK,"
                + "VVFEUROKURS=:VVFEUROKURS,"
                + "VVFEUROKURSVK=:VVFEUROKURSVK,"
                + "VVLOHNKD=:VVLOHNKD,"
                + "VVARCHKZ=:VVARCHKZ,"
                + "VVARCHDAT=:VVARCHDAT,"
                + "VVARCHBEL=:VVARCHBEL,"
                + "VVSEQUNO=:VVSEQUNO,"
                + "VVLFDPN=:VVLFDPN,"
                + "VVARTGRP=:VVARTGRP,"
                + "VVAETINEU=:VVAETINEU,"
                + "VVPTARIF=:VVPTARIF,"
                + "VVANSPRECH=:VVANSPRECH,"
                + "VVANSPZUS=:VVANSPZUS,"
                + "VVTRANSSEQ=:VVTRANSSEQ,"
                + "VVEDI=:VVEDI,"
                + "VVEDIDAT=:VVEDIDAT,"
                + "VVQUITTAIO=:VVQUITTAIO,"
                + "VVGESMTR=:VVGESMTR,"
                + "VVLOAD=:VVLOAD,"
                + "VVFILLER=:VVFILLER,"
                + "VVAENDZL=:VVAENDZL,"
                + "VVAENDBEN=:VVAENDBEN,"
                + "VVAENDDAT=:VVAENDDAT,"
                + "VVNEUBEN=:VVNEUBEN,"
                + "VVNEUDAT=:VVNEUDAT"
            + " WHERE  "
            + "  VVMANDANT=:VVMANDANT AND VVLIEFSCH=:VVLIEFSCH";
            #endregion

                       #region====Parameters====
            or1.Parameters.Add("VVMANDANT", OracleType.NVarChar).Value = dwData["VVMANDANT"].ToString();
            or1.Parameters.Add("VVLIEFSCH", OracleType.NVarChar).Value = dwData["VVLIEFSCH"].ToString();
            or1.Parameters.Add("VVLO", OracleType.NVarChar).Value = dwData["VVLO"].ToString();
            or1.Parameters.Add("VVPRODST1", OracleType.NVarChar).Value = dwData["VVPRODST1"].ToString();
            or1.Parameters.Add("VVPRODST2", OracleType.NVarChar).Value = dwData["VVPRODST2"].ToString();
            or1.Parameters.Add("VVPRODST3", OracleType.NVarChar).Value = dwData["VVPRODST3"].ToString();
            or1.Parameters.Add("VVPRODST4", OracleType.NVarChar).Value = dwData["VVPRODST4"].ToString();
            or1.Parameters.Add("VVPRODST5", OracleType.NVarChar).Value = dwData["VVPRODST5"].ToString();
            or1.Parameters.Add("VVPRODST6", OracleType.NVarChar).Value = dwData["VVPRODST6"].ToString();
            or1.Parameters.Add("VVPRODST7", OracleType.NVarChar).Value = dwData["VVPRODST7"].ToString();
            or1.Parameters.Add("VVPRODST8", OracleType.NVarChar).Value = dwData["VVPRODST8"].ToString();
            or1.Parameters.Add("VVPRODST9", OracleType.NVarChar).Value = dwData["VVPRODST9"].ToString();
            or1.Parameters.Add("VVLIEFSCHTYP", OracleType.NVarChar).Value = dwData["VVLIEFSCHTYP"].ToString();
            or1.Parameters.Add("VVKZINLEXP", OracleType.NVarChar).Value = dwData["VVKZINLEXP"].ToString();
            or1.Parameters.Add("VVSTATUS", OracleType.NVarChar).Value = dwData["VVSTATUS"].ToString();
            or1.Parameters.Add("VVVERSART", OracleType.NVarChar).Value = dwData["VVVERSART"].ToString();
            or1.Parameters.Add("VVSPED", OracleType.NVarChar).Value = dwData["VVSPED"].ToString();
            or1.Parameters.Add("VVVERSARTU", OracleType.NVarChar).Value = dwData["VVVERSARTU"].ToString();
            or1.Parameters.Add("VVSPEDU", OracleType.NVarChar).Value = dwData["VVSPEDU"].ToString();
            or1.Parameters.Add("VVVERSARTV", OracleType.NVarChar).Value = dwData["VVVERSARTV"].ToString();
            or1.Parameters.Add("VVSPEDV", OracleType.NVarChar).Value = dwData["VVSPEDV"].ToString();
            or1.Parameters.Add("VVEBDAT", OracleType.NVarChar).Value = dwData["VVEBDAT"].ToString();
            or1.Parameters.Add("VVKZEBBUCH", OracleType.NVarChar).Value = dwData["VVKZEBBUCH"].ToString();
            or1.Parameters.Add("VVLAND", OracleType.NVarChar).Value = dwData["VVLAND"].ToString();
            or1.Parameters.Add("VVPLZ", OracleType.NVarChar).Value = dwData["VVPLZ"].ToString();
            or1.Parameters.Add("VVORT", OracleType.NVarChar).Value = dwData["VVORT"].ToString();
            or1.Parameters.Add("VVBZ", OracleType.NVarChar).Value = dwData["VVBZ"].ToString();
            or1.Parameters.Add("VVBZBEZ", OracleType.NVarChar).Value = dwData["VVBZBEZ"].ToString();
            or1.Parameters.Add("VVCOUNTY", OracleType.NVarChar).Value = dwData["VVCOUNTY"].ToString();
            or1.Parameters.Add("VVCITY", OracleType.NVarChar).Value = dwData["VVCITY"].ToString();
            or1.Parameters.Add("VVAVISNR", OracleType.NVarChar).Value = dwData["VVAVISNR"].ToString();
            or1.Parameters.Add("VVFBR", OracleType.NVarChar).Value = dwData["VVFBR"].ToString();
            or1.Parameters.Add("VVLIEFBED", OracleType.NVarChar).Value = dwData["VVLIEFBED"].ToString();
            or1.Parameters.Add("VVKZKOSTBER", OracleType.NVarChar).Value = dwData["VVKZKOSTBER"].ToString();
            or1.Parameters.Add("VVLANDU", OracleType.NVarChar).Value = dwData["VVLANDU"].ToString();
            or1.Parameters.Add("VVPLZU", OracleType.NVarChar).Value = dwData["VVPLZU"].ToString();
            or1.Parameters.Add("VVORTU", OracleType.NVarChar).Value = dwData["VVORTU"].ToString();
            or1.Parameters.Add("VVBZU", OracleType.NVarChar).Value = dwData["VVBZU"].ToString();
            or1.Parameters.Add("VVBZBEZU", OracleType.NVarChar).Value = dwData["VVBZBEZU"].ToString();
            or1.Parameters.Add("VVCOUNTYU", OracleType.NVarChar).Value = dwData["VVCOUNTYU"].ToString();
            or1.Parameters.Add("VVCITYU", OracleType.NVarChar).Value = dwData["VVCITYU"].ToString();
            or1.Parameters.Add("VVLIEFSCHGRP", OracleType.NVarChar).Value = dwData["VVLIEFSCHGRP"].ToString();
            or1.Parameters.Add("VVVERSDAT", OracleType.NVarChar).Value = dwData["VVVERSDAT"].ToString();
            or1.Parameters.Add("VVLIEFDAT", OracleType.NVarChar).Value = dwData["VVLIEFDAT"].ToString();
            or1.Parameters.Add("VVFIXDAT", OracleType.NVarChar).Value = dwData["VVFIXDAT"].ToString();
            or1.Parameters.Add("VVVERPART", OracleType.NVarChar).Value = dwData["VVVERPART"].ToString();
            or1.Parameters.Add("VVGUETERNR", OracleType.NVarChar).Value = dwData["VVGUETERNR"].ToString();
            or1.Parameters.Add("VVKZEINZEL", OracleType.NVarChar).Value = dwData["VVKZEINZEL"].ToString();
            or1.Parameters.Add("VVEINZTARA", OracleType.NVarChar).Value = dwData["VVEINZTARA"].ToString();
            or1.Parameters.Add("VVEINZBRUT", OracleType.NVarChar).Value = dwData["VVEINZBRUT"].ToString();
            or1.Parameters.Add("VVEINZNET", OracleType.NVarChar).Value = dwData["VVEINZNET"].ToString();
            or1.Parameters.Add("VVANZ", OracleType.NVarChar).Value = dwData["VVANZ"].ToString();
            or1.Parameters.Add("VVTARA", OracleType.NVarChar).Value = dwData["VVTARA"].ToString();
            or1.Parameters.Add("VVBRUTTO", OracleType.NVarChar).Value = dwData["VVBRUTTO"].ToString();
            or1.Parameters.Add("VVNETTO", OracleType.NVarChar).Value = dwData["VVNETTO"].ToString();
            or1.Parameters.Add("VVVOLUMEN", OracleType.NVarChar).Value = dwData["VVVOLUMEN"].ToString();
            or1.Parameters.Add("VVANZSTK", OracleType.NVarChar).Value = dwData["VVANZSTK"].ToString();
            or1.Parameters.Add("VVNETMTR", OracleType.NVarChar).Value = dwData["VVNETMTR"].ToString();
            or1.Parameters.Add("VVWERT", OracleType.NVarChar).Value = dwData["VVWERT"].ToString();
            or1.Parameters.Add("VVLB1", OracleType.NVarChar).Value = dwData["VVLB1"].ToString();
            or1.Parameters.Add("VVANZPAL1", OracleType.NVarChar).Value = dwData["VVANZPAL1"].ToString();
            or1.Parameters.Add("VVANZAPAL1", OracleType.NVarChar).Value = dwData["VVANZAPAL1"].ToString();
            or1.Parameters.Add("VVANZRPAL1", OracleType.NVarChar).Value = dwData["VVANZRPAL1"].ToString();
            or1.Parameters.Add("VVLB2", OracleType.NVarChar).Value = dwData["VVLB2"].ToString();
            or1.Parameters.Add("VVANZPAL2", OracleType.NVarChar).Value = dwData["VVANZPAL2"].ToString();
            or1.Parameters.Add("VVANZAPAL2", OracleType.NVarChar).Value = dwData["VVANZAPAL2"].ToString();
            or1.Parameters.Add("VVANZRPAL2", OracleType.NVarChar).Value = dwData["VVANZRPAL2"].ToString();
            or1.Parameters.Add("VVLB3", OracleType.NVarChar).Value = dwData["VVLB3"].ToString();
            or1.Parameters.Add("VVANZPAL3", OracleType.NVarChar).Value = dwData["VVANZPAL3"].ToString();
            or1.Parameters.Add("VVANZAPAL3", OracleType.NVarChar).Value = dwData["VVANZAPAL3"].ToString();
            or1.Parameters.Add("VVANZRPAL3", OracleType.NVarChar).Value = dwData["VVANZRPAL3"].ToString();
            or1.Parameters.Add("VVLB4", OracleType.NVarChar).Value = dwData["VVLB4"].ToString();
            or1.Parameters.Add("VVANZPAL4", OracleType.NVarChar).Value = dwData["VVANZPAL4"].ToString();
            or1.Parameters.Add("VVANZAPAL4", OracleType.NVarChar).Value = dwData["VVANZAPAL4"].ToString();
            or1.Parameters.Add("VVANZRPAL4", OracleType.NVarChar).Value = dwData["VVANZRPAL4"].ToString();
            or1.Parameters.Add("VVLB5", OracleType.NVarChar).Value = dwData["VVLB5"].ToString();
            or1.Parameters.Add("VVANZPAL5", OracleType.NVarChar).Value = dwData["VVANZPAL5"].ToString();
            or1.Parameters.Add("VVANZAPAL5", OracleType.NVarChar).Value = dwData["VVANZAPAL5"].ToString();
            or1.Parameters.Add("VVANZRPAL5", OracleType.NVarChar).Value = dwData["VVANZRPAL5"].ToString();
            or1.Parameters.Add("VVLB6", OracleType.NVarChar).Value = dwData["VVLB6"].ToString();
            or1.Parameters.Add("VVANZPAL6", OracleType.NVarChar).Value = dwData["VVANZPAL6"].ToString();
            or1.Parameters.Add("VVANZAPAL6", OracleType.NVarChar).Value = dwData["VVANZAPAL6"].ToString();
            or1.Parameters.Add("VVANZRPAL6", OracleType.NVarChar).Value = dwData["VVANZRPAL6"].ToString();
            or1.Parameters.Add("VVKOLP", OracleType.NVarChar).Value = dwData["VVKOLP"].ToString();
            or1.Parameters.Add("VVVPLP", OracleType.NVarChar).Value = dwData["VVVPLP"].ToString();
            or1.Parameters.Add("VVTPSTA", OracleType.NVarChar).Value = dwData["VVTPSTA"].ToString();
            or1.Parameters.Add("VVTPMA1", OracleType.NVarChar).Value = dwData["VVTPMA1"].ToString();
            or1.Parameters.Add("VVTPMAANZ1", OracleType.NVarChar).Value = dwData["VVTPMAANZ1"].ToString();
            or1.Parameters.Add("VVTPMA2", OracleType.NVarChar).Value = dwData["VVTPMA2"].ToString();
            or1.Parameters.Add("VVTPMAANZ2", OracleType.NVarChar).Value = dwData["VVTPMAANZ2"].ToString();
            or1.Parameters.Add("VVGTBS", OracleType.NVarChar).Value = dwData["VVGTBS"].ToString();
            or1.Parameters.Add("VVGTBK", OracleType.NVarChar).Value = dwData["VVGTBK"].ToString();
            or1.Parameters.Add("VVKM1", OracleType.NVarChar).Value = dwData["VVKM1"].ToString();
            or1.Parameters.Add("VVGTBZ", OracleType.NVarChar).Value = dwData["VVGTBZ"].ToString();
            or1.Parameters.Add("VVKM2", OracleType.NVarChar).Value = dwData["VVKM2"].ToString();
            or1.Parameters.Add("VVTARIF1", OracleType.NVarChar).Value = dwData["VVTARIF1"].ToString();
            or1.Parameters.Add("VVORTKL1", OracleType.NVarChar).Value = dwData["VVORTKL1"].ToString();
            or1.Parameters.Add("VVFRPFL1", OracleType.NVarChar).Value = dwData["VVFRPFL1"].ToString();
            or1.Parameters.Add("VVLAKL1", OracleType.NVarChar).Value = dwData["VVLAKL1"].ToString();
            or1.Parameters.Add("VVFRSATZ1", OracleType.NVarChar).Value = dwData["VVFRSATZ1"].ToString();
            or1.Parameters.Add("VVFRERRECH1", OracleType.NVarChar).Value = dwData["VVFRERRECH1"].ToString();
            or1.Parameters.Add("VVMARGEP1", OracleType.NVarChar).Value = dwData["VVMARGEP1"].ToString();
            or1.Parameters.Add("VVMARGEA1", OracleType.NVarChar).Value = dwData["VVMARGEA1"].ToString();
            or1.Parameters.Add("VVSUMME1", OracleType.NVarChar).Value = dwData["VVSUMME1"].ToString();
            or1.Parameters.Add("VVTARIF2", OracleType.NVarChar).Value = dwData["VVTARIF2"].ToString();
            or1.Parameters.Add("VVORTKL2", OracleType.NVarChar).Value = dwData["VVORTKL2"].ToString();
            or1.Parameters.Add("VVFRPFL2", OracleType.NVarChar).Value = dwData["VVFRPFL2"].ToString();
            or1.Parameters.Add("VVLAKL2", OracleType.NVarChar).Value = dwData["VVLAKL2"].ToString();
            or1.Parameters.Add("VVFRSATZ2", OracleType.NVarChar).Value = dwData["VVFRSATZ2"].ToString();
            or1.Parameters.Add("VVFRERRECH2", OracleType.NVarChar).Value = dwData["VVFRERRECH2"].ToString();
            or1.Parameters.Add("VVMARGEP2", OracleType.NVarChar).Value = dwData["VVMARGEP2"].ToString();
            or1.Parameters.Add("VVMARGEA2", OracleType.NVarChar).Value = dwData["VVMARGEA2"].ToString();
            or1.Parameters.Add("VVSUMME2", OracleType.NVarChar).Value = dwData["VVSUMME2"].ToString();
            or1.Parameters.Add("VVTARIF3", OracleType.NVarChar).Value = dwData["VVTARIF3"].ToString();
            or1.Parameters.Add("VVORTKL3", OracleType.NVarChar).Value = dwData["VVORTKL3"].ToString();
            or1.Parameters.Add("VVFRPFL3", OracleType.NVarChar).Value = dwData["VVFRPFL3"].ToString();
            or1.Parameters.Add("VVLAKL3", OracleType.NVarChar).Value = dwData["VVLAKL3"].ToString();
            or1.Parameters.Add("VVFRSATZ3", OracleType.NVarChar).Value = dwData["VVFRSATZ3"].ToString();
            or1.Parameters.Add("VVFRERRECH3", OracleType.NVarChar).Value = dwData["VVFRERRECH3"].ToString();
            or1.Parameters.Add("VVMARGEP3", OracleType.NVarChar).Value = dwData["VVMARGEP3"].ToString();
            or1.Parameters.Add("VVMARGEA3", OracleType.NVarChar).Value = dwData["VVMARGEA3"].ToString();
            or1.Parameters.Add("VVSUMME3", OracleType.NVarChar).Value = dwData["VVSUMME3"].ToString();
            or1.Parameters.Add("VVPRAEMIEV", OracleType.NVarChar).Value = dwData["VVPRAEMIEV"].ToString();
            or1.Parameters.Add("VVPOLICE", OracleType.NVarChar).Value = dwData["VVPOLICE"].ToString();
            or1.Parameters.Add("VVGDATBIS", OracleType.NVarChar).Value = dwData["VVGDATBIS"].ToString();
            or1.Parameters.Add("VVWERTV", OracleType.NVarChar).Value = dwData["VVWERTV"].ToString();
            or1.Parameters.Add("VVWAEHRSLV", OracleType.NVarChar).Value = dwData["VVWAEHRSLV"].ToString();
            or1.Parameters.Add("VVNEBENKO", OracleType.NVarChar).Value = dwData["VVNEBENKO"].ToString();
            or1.Parameters.Add("VVWAEHRSLN", OracleType.NVarChar).Value = dwData["VVWAEHRSLN"].ToString();
            or1.Parameters.Add("VVNACHNA", OracleType.NVarChar).Value = dwData["VVNACHNA"].ToString();
            or1.Parameters.Add("VVFESTBETR", OracleType.NVarChar).Value = dwData["VVFESTBETR"].ToString();
            or1.Parameters.Add("VVVERZOLLT", OracleType.NVarChar).Value = dwData["VVVERZOLLT"].ToString();
            or1.Parameters.Add("VVKZABRFR", OracleType.NVarChar).Value = dwData["VVKZABRFR"].ToString();
            or1.Parameters.Add("VVZAHLART", OracleType.NVarChar).Value = dwData["VVZAHLART"].ToString();
            or1.Parameters.Add("VVZAHLBED", OracleType.NVarChar).Value = dwData["VVZAHLBED"].ToString();
            or1.Parameters.Add("VVKZLSPERR", OracleType.NVarChar).Value = dwData["VVKZLSPERR"].ToString();
            or1.Parameters.Add("VVANAME1", OracleType.NVarChar).Value = dwData["VVANAME1"].ToString();
            or1.Parameters.Add("VVANAME2", OracleType.NVarChar).Value = dwData["VVANAME2"].ToString();
            or1.Parameters.Add("VVASTRASSE", OracleType.NVarChar).Value = dwData["VVASTRASSE"].ToString();
            or1.Parameters.Add("VVASTRASSE2", OracleType.NVarChar).Value = dwData["VVASTRASSE2"].ToString();
            or1.Parameters.Add("VVALAND", OracleType.NVarChar).Value = dwData["VVALAND"].ToString();
            or1.Parameters.Add("VVAPLZ", OracleType.NVarChar).Value = dwData["VVAPLZ"].ToString();
            or1.Parameters.Add("VVAORT", OracleType.NVarChar).Value = dwData["VVAORT"].ToString();
            or1.Parameters.Add("VVABZ", OracleType.NVarChar).Value = dwData["VVABZ"].ToString();
            or1.Parameters.Add("VVABZBEZ", OracleType.NVarChar).Value = dwData["VVABZBEZ"].ToString();
            or1.Parameters.Add("VVACOUNTY", OracleType.NVarChar).Value = dwData["VVACOUNTY"].ToString();
            or1.Parameters.Add("VVACITY", OracleType.NVarChar).Value = dwData["VVACITY"].ToString();
            or1.Parameters.Add("VVKUNDNRV", OracleType.NVarChar).Value = dwData["VVKUNDNRV"].ToString();
            or1.Parameters.Add("VVADRSLV", OracleType.NVarChar).Value = dwData["VVADRSLV"].ToString();
            or1.Parameters.Add("VVKUNDNRE", OracleType.NVarChar).Value = dwData["VVKUNDNRE"].ToString();
            or1.Parameters.Add("VVEMPFKZ", OracleType.NVarChar).Value = dwData["VVEMPFKZ"].ToString();
            or1.Parameters.Add("VVADRSLL", OracleType.NVarChar).Value = dwData["VVADRSLL"].ToString();
            or1.Parameters.Add("VVADRSLO", OracleType.NVarChar).Value = dwData["VVADRSLO"].ToString();
            or1.Parameters.Add("VVKUNDNRVF", OracleType.NVarChar).Value = dwData["VVKUNDNRVF"].ToString();
            or1.Parameters.Add("VVADRSLKVF", OracleType.NVarChar).Value = dwData["VVADRSLKVF"].ToString();
            or1.Parameters.Add("VVADRSLLVF", OracleType.NVarChar).Value = dwData["VVADRSLLVF"].ToString();
            or1.Parameters.Add("VVKUNDNRR", OracleType.NVarChar).Value = dwData["VVKUNDNRR"].ToString();
            or1.Parameters.Add("VVADRSLKR", OracleType.NVarChar).Value = dwData["VVADRSLKR"].ToString();
            or1.Parameters.Add("VVADRSLLR", OracleType.NVarChar).Value = dwData["VVADRSLLR"].ToString();
            or1.Parameters.Add("VVKUNDNRF", OracleType.NVarChar).Value = dwData["VVKUNDNRF"].ToString();
            or1.Parameters.Add("VVADRSLKF", OracleType.NVarChar).Value = dwData["VVADRSLKF"].ToString();
            or1.Parameters.Add("VVADRSLLF", OracleType.NVarChar).Value = dwData["VVADRSLLF"].ToString();
            or1.Parameters.Add("VVANTEILF", OracleType.NVarChar).Value = dwData["VVANTEILF"].ToString();
            or1.Parameters.Add("VVPI", OracleType.NVarChar).Value = dwData["VVPI"].ToString();
            or1.Parameters.Add("VVET", OracleType.NVarChar).Value = dwData["VVET"].ToString();
            or1.Parameters.Add("VVLS", OracleType.NVarChar).Value = dwData["VVLS"].ToString();
            or1.Parameters.Add("VVPA", OracleType.NVarChar).Value = dwData["VVPA"].ToString();
            or1.Parameters.Add("VVLA", OracleType.NVarChar).Value = dwData["VVLA"].ToString();
            or1.Parameters.Add("VVFR", OracleType.NVarChar).Value = dwData["VVFR"].ToString();
            or1.Parameters.Add("VVAV", OracleType.NVarChar).Value = dwData["VVAV"].ToString();
            or1.Parameters.Add("VVDECKBLATT", OracleType.NVarChar).Value = dwData["VVDECKBLATT"].ToString();
            or1.Parameters.Add("VVLIEFSCHPOS", OracleType.NVarChar).Value = dwData["VVLIEFSCHPOS"].ToString();
            or1.Parameters.Add("VVLPACKNR", OracleType.NVarChar).Value = dwData["VVLPACKNR"].ToString();
            or1.Parameters.Add("VVANZTLIEF", OracleType.NVarChar).Value = dwData["VVANZTLIEF"].ToString();
            or1.Parameters.Add("VVANZTLIEFR", OracleType.NVarChar).Value = dwData["VVANZTLIEFR"].ToString();
            or1.Parameters.Add("VVANZTLIEFB", OracleType.NVarChar).Value = dwData["VVANZTLIEFB"].ToString();
            or1.Parameters.Add("VVLIEFTERM", OracleType.NVarChar).Value = dwData["VVLIEFTERM"].ToString();
            or1.Parameters.Add("VVFRACHTBE", OracleType.NVarChar).Value = dwData["VVFRACHTBE"].ToString();
            or1.Parameters.Add("VVVB", OracleType.NVarChar).Value = dwData["VVVB"].ToString();
            or1.Parameters.Add("VVKZKUNDV", OracleType.NVarChar).Value = dwData["VVKZKUNDV"].ToString();
            or1.Parameters.Add("VVZONE", OracleType.NVarChar).Value = dwData["VVZONE"].ToString();
            or1.Parameters.Add("VVKGBIS", OracleType.NVarChar).Value = dwData["VVKGBIS"].ToString();
            or1.Parameters.Add("VVKDVKL", OracleType.NVarChar).Value = dwData["VVKDVKL"].ToString();
            or1.Parameters.Add("VVADRSLLUR", OracleType.NVarChar).Value = dwData["VVADRSLLUR"].ToString();
            or1.Parameters.Add("VVVALUTA", OracleType.NVarChar).Value = dwData["VVVALUTA"].ToString();
            or1.Parameters.Add("VVVALDAT", OracleType.NVarChar).Value = dwData["VVVALDAT"].ToString();
            or1.Parameters.Add("VVEKON", OracleType.NVarChar).Value = dwData["VVEKON"].ToString();
            or1.Parameters.Add("VVVERSIBE", OracleType.NVarChar).Value = dwData["VVVERSIBE"].ToString();
            or1.Parameters.Add("VVVSTK", OracleType.NVarChar).Value = dwData["VVVSTK"].ToString();
            or1.Parameters.Add("VVLSTKPA", OracleType.NVarChar).Value = dwData["VVLSTKPA"].ToString();
            or1.Parameters.Add("VVPAUFKRS", OracleType.NVarChar).Value = dwData["VVPAUFKRS"].ToString();
            or1.Parameters.Add("VVPAUFLFD", OracleType.NVarChar).Value = dwData["VVPAUFLFD"].ToString();
            or1.Parameters.Add("VVPAUFPOS", OracleType.NVarChar).Value = dwData["VVPAUFPOS"].ToString();
            or1.Parameters.Add("VVVERPKOST", OracleType.NVarChar).Value = dwData["VVVERPKOST"].ToString();
            or1.Parameters.Add("VVKOSTBGR", OracleType.NVarChar).Value = dwData["VVKOSTBGR"].ToString();
            or1.Parameters.Add("VVVERPKOSTE", OracleType.NVarChar).Value = dwData["VVVERPKOSTE"].ToString();
            or1.Parameters.Add("VVLIEFNR", OracleType.NVarChar).Value = dwData["VVLIEFNR"].ToString();
            or1.Parameters.Add("VVRENR", OracleType.NVarChar).Value = dwData["VVRENR"].ToString();
            or1.Parameters.Add("VVREPOS", OracleType.NVarChar).Value = dwData["VVREPOS"].ToString();
            or1.Parameters.Add("VVREDAT", OracleType.NVarChar).Value = dwData["VVREDAT"].ToString();
            or1.Parameters.Add("VVFRNETTO", OracleType.NVarChar).Value = dwData["VVFRNETTO"].ToString();
            or1.Parameters.Add("VVFRKSTA", OracleType.NVarChar).Value = dwData["VVFRKSTA"].ToString();
            or1.Parameters.Add("VVZOLLPAP", OracleType.NVarChar).Value = dwData["VVZOLLPAP"].ToString();
            or1.Parameters.Add("VVPROGRP", OracleType.NVarChar).Value = dwData["VVPROGRP"].ToString();
            or1.Parameters.Add("VVUEBKZ", OracleType.NVarChar).Value = dwData["VVUEBKZ"].ToString();
            or1.Parameters.Add("VVDROFT", OracleType.NVarChar).Value = dwData["VVDROFT"].ToString();
            or1.Parameters.Add("VVKREDLIM", OracleType.NVarChar).Value = dwData["VVKREDLIM"].ToString();
            or1.Parameters.Add("VVSWING", OracleType.NVarChar).Value = dwData["VVSWING"].ToString();
            or1.Parameters.Add("VVRAITING", OracleType.NVarChar).Value = dwData["VVRAITING"].ToString();
            or1.Parameters.Add("VVVERS", OracleType.NVarChar).Value = dwData["VVVERS"].ToString();
            or1.Parameters.Add("VVKREDBIS", OracleType.NVarChar).Value = dwData["VVKREDBIS"].ToString();
            or1.Parameters.Add("VVKREDVON", OracleType.NVarChar).Value = dwData["VVKREDVON"].ToString();
            or1.Parameters.Add("VVLUEBKZ", OracleType.NVarChar).Value = dwData["VVLUEBKZ"].ToString();
            or1.Parameters.Add("VVFRDAT", OracleType.NVarChar).Value = dwData["VVFRDAT"].ToString();
            or1.Parameters.Add("VVFRZEIT", OracleType.NVarChar).Value = dwData["VVFRZEIT"].ToString();
            or1.Parameters.Add("VVFRBENID", OracleType.NVarChar).Value = dwData["VVFRBENID"].ToString();
            or1.Parameters.Add("VVKUNDNRRE", OracleType.NVarChar).Value = dwData["VVKUNDNRRE"].ToString();
            or1.Parameters.Add("VVLIEFART", OracleType.NVarChar).Value = dwData["VVLIEFART"].ToString();
            or1.Parameters.Add("VVKTRANSDAT", OracleType.NVarChar).Value = dwData["VVKTRANSDAT"].ToString();
            or1.Parameters.Add("VVKTRANSUHR", OracleType.NVarChar).Value = dwData["VVKTRANSUHR"].ToString();
            or1.Parameters.Add("VVKTRANSBEN", OracleType.NVarChar).Value = dwData["VVKTRANSBEN"].ToString();
            or1.Parameters.Add("VVKTRANSSTA", OracleType.NVarChar).Value = dwData["VVKTRANSSTA"].ToString();
            or1.Parameters.Add("VVSTRANSDATA", OracleType.NVarChar).Value = dwData["VVSTRANSDATA"].ToString();
            or1.Parameters.Add("VVSTRANSUHRA", OracleType.NVarChar).Value = dwData["VVSTRANSUHRA"].ToString();
            or1.Parameters.Add("VVSTRANSERL", OracleType.NVarChar).Value = dwData["VVSTRANSERL"].ToString();
            or1.Parameters.Add("VVSTRANSDATE", OracleType.NVarChar).Value = dwData["VVSTRANSDATE"].ToString();
            or1.Parameters.Add("VVSTRANSUHRE", OracleType.NVarChar).Value = dwData["VVSTRANSUHRE"].ToString();
            or1.Parameters.Add("VVETRANSDAT", OracleType.NVarChar).Value = dwData["VVETRANSDAT"].ToString();
            or1.Parameters.Add("VVETRANSUHR", OracleType.NVarChar).Value = dwData["VVETRANSUHR"].ToString();
            or1.Parameters.Add("VVETRANSBEN", OracleType.NVarChar).Value = dwData["VVETRANSBEN"].ToString();
            or1.Parameters.Add("VVAKTKZ", OracleType.NVarChar).Value = dwData["VVAKTKZ"].ToString();
            or1.Parameters.Add("VVPSTKKZ", OracleType.NVarChar).Value = dwData["VVPSTKKZ"].ToString();
            or1.Parameters.Add("VVANZVP", OracleType.NVarChar).Value = dwData["VVANZVP"].ToString();
            or1.Parameters.Add("VVWAEHRSL", OracleType.NVarChar).Value = dwData["VVWAEHRSL"].ToString();
            or1.Parameters.Add("VVHWAEHRSL", OracleType.NVarChar).Value = dwData["VVHWAEHRSL"].ToString();
            or1.Parameters.Add("VVHEUROKURS", OracleType.NVarChar).Value = dwData["VVHEUROKURS"].ToString();
            or1.Parameters.Add("VVHEUROKURSVK", OracleType.NVarChar).Value = dwData["VVHEUROKURSVK"].ToString();
            or1.Parameters.Add("VVFEUROKURS", OracleType.NVarChar).Value = dwData["VVFEUROKURS"].ToString();
            or1.Parameters.Add("VVFEUROKURSVK", OracleType.NVarChar).Value = dwData["VVFEUROKURSVK"].ToString();
            or1.Parameters.Add("VVLOHNKD", OracleType.NVarChar).Value = dwData["VVLOHNKD"].ToString();
            or1.Parameters.Add("VVARCHKZ", OracleType.NVarChar).Value = dwData["VVARCHKZ"].ToString();
            or1.Parameters.Add("VVARCHDAT", OracleType.NVarChar).Value = dwData["VVARCHDAT"].ToString();
            or1.Parameters.Add("VVARCHBEL", OracleType.NVarChar).Value = dwData["VVARCHBEL"].ToString();
            or1.Parameters.Add("VVSEQUNO", OracleType.NVarChar).Value = dwData["VVSEQUNO"].ToString();
            or1.Parameters.Add("VVLFDPN", OracleType.NVarChar).Value = dwData["VVLFDPN"].ToString();
            or1.Parameters.Add("VVARTGRP", OracleType.NVarChar).Value = dwData["VVARTGRP"].ToString();
            or1.Parameters.Add("VVAETINEU", OracleType.NVarChar).Value = dwData["VVAETINEU"].ToString();
            or1.Parameters.Add("VVPTARIF", OracleType.NVarChar).Value = dwData["VVPTARIF"].ToString();
            or1.Parameters.Add("VVANSPRECH", OracleType.NVarChar).Value = dwData["VVANSPRECH"].ToString();
            or1.Parameters.Add("VVANSPZUS", OracleType.NVarChar).Value = dwData["VVANSPZUS"].ToString();
            or1.Parameters.Add("VVTRANSSEQ", OracleType.NVarChar).Value = dwData["VVTRANSSEQ"].ToString();
            or1.Parameters.Add("VVEDI", OracleType.NVarChar).Value = dwData["VVEDI"].ToString();
            or1.Parameters.Add("VVEDIDAT", OracleType.NVarChar).Value = dwData["VVEDIDAT"].ToString();
            or1.Parameters.Add("VVQUITTAIO", OracleType.NVarChar).Value = dwData["VVQUITTAIO"].ToString();
            or1.Parameters.Add("VVGESMTR", OracleType.NVarChar).Value = dwData["VVGESMTR"].ToString();
            or1.Parameters.Add("VVLOAD", OracleType.NVarChar).Value = dwData["VVLOAD"].ToString();
            or1.Parameters.Add("VVFILLER", OracleType.NVarChar).Value = dwData["VVFILLER"].ToString();
            or1.Parameters.Add("VVAENDZL", OracleType.NVarChar).Value = dwData["VVAENDZL"].ToString();
            or1.Parameters.Add("VVAENDBEN", OracleType.NVarChar).Value = dwData["VVAENDBEN"].ToString();
            or1.Parameters.Add("VVAENDDAT", OracleType.NVarChar).Value = dwData["VVAENDDAT"].ToString();
            or1.Parameters.Add("VVNEUBEN", OracleType.NVarChar).Value = dwData["VVNEUBEN"].ToString();
            or1.Parameters.Add("VVNEUDAT", OracleType.NVarChar).Value = dwData["VVNEUDAT"].ToString();
            #endregion
                    break;
                case 2:
                   #region====Command====
                    or1.CommandText = "UPDATE VVLIEF SET "
                        + "VVSEQUNO=:VVSEQUNO,"
                        + "VVORTU=:VVORTU,"
                        + "VVBZBEZU=:VVBZBEZU,"
                        + "VVRAITING=:VVRAITING "
                    + " WHERE   VVLIEFSCH=:VVLIEFSCH"; 
                    or1.Parameters.Add("VVLIEFSCH", OracleType.NVarChar).Value = dwData["VVLIEFSCH"].ToString();
                    or1.Parameters.Add("VVBZBEZU", OracleType.NVarChar).Value = dwData["VVBZBEZU"].ToString();
                    or1.Parameters.Add("VVSEQUNO", OracleType.NVarChar).Value = dwData["VVSEQUNO"].ToString();
                    or1.Parameters.Add("VVORTU", OracleType.NVarChar).Value = dwData["VVORTU"].ToString();
                    or1.Parameters.Add("VVRAITING", OracleType.NVarChar).Value = dwData["VVRAITING"].ToString(); 
                    #endregion
                    break;
            } 
            Connect2Proxy(or1);
        }
    }
}
